package ex3;

public class Student {
    private String sName;
    private String sNum;
    private int englishScore;
    private int mathScore;
    private int javaScore;
    private int sum;
    public String getsName() {
        return sName;
    }

    public void setsName(String sName) {
        this.sName = sName;
    }

    public String getsNum() {
        return sNum;
    }

    public void setsNum(String sNum) {
        this.sNum = sNum;
    }

    public int getEnglishScore() {
        return englishScore;
    }

    public void setEnglishScore(int englishScore) {
        this.englishScore = englishScore;
    }

    public int getMathScore() {
        return mathScore;
    }

    public void setMathScore(int mathScore) {
        this.mathScore = mathScore;
    }

    public int getJavaScore() {
        return javaScore;
    }

    public void setJavaScore(int javaScore) {
        this.javaScore = javaScore;
    }
    public Student(){

    }
    public Student(String sName, String sNum, int englishScore,
                   int mathScore, int javaScore) {
        this.sName = sName;
        this.sNum = sNum;
        this.englishScore = englishScore;
        this.mathScore = mathScore;
        this.javaScore = javaScore;
    }
    public void displayScore(Student s){
        System.out.println("===============");
        System.out.println("sName:"+s.sName);
        System.out.println("sNum:"+s.sNum);
        System.out.println("english:"+s.englishScore);
        System.out.println("math:"+s.mathScore);
        System.out.println("java:"+s.javaScore);
    }

    public void scoreSum(Student s){
        this.sum=mathScore+s.englishScore+s.javaScore;
        System.out.println(s.sName+":"+sum);
    }
}
